﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;

namespace CSharpTestApp
{
    public class ExecuteCmd
    {
        public void ExecuteApp()
        {
            //string exeFileName = @"E:\WorkSpace\code\Oschina\UnityTest\Exe\UnityTest.exe";
            string exeFileName = @"C:\Users\Administrator\AppData\LocalLow\ND\SZXUnityExe\UnityTest.exe";
            //string exeFileName = @"C:\Users\Administrator\AppData\Roaming\SZXUnityExe\UnityTest.exe";
            ProcessStartInfo psi = new ProcessStartInfo();
            psi.FileName = exeFileName;
            psi.Arguments = "asdafsdfa";
            psi.WindowStyle = ProcessWindowStyle.Minimized;
            psi.UseShellExecute = false;
            psi.CreateNoWindow = true;
            File.AppendAllText(@"F:\Code\Edbox\Edbox_FiveChess\EXE\logTest.txt", exeFileName + " ExecuteApp: exeFileName\n");
            Process proc = Process.Start(psi);
            Process.GetCurrentProcess().Kill();
        }
    }
}
